3.56 \(\int \frac{\sin ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx\)

Optimal. Leaf size=84 \[ \frac{\cos ^3(e+f x)}{3 f (a-b)}-\frac{a \cos (e+f x)}{f (a-b)^2}-\frac{a \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{f (a-b)^{5/2}} \]

[Out]

-((a*Sqrt[b]*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/((a - b)^(5/2)*f)) - (a*Cos[e + f*x])/((a - b)^2*f) +
 Cos[e + f*x]^3/(3*(a - b)*f)

________________________________________________________________________________________

Rubi [A]  time = 0.122553, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {3664, 453, 325, 205} \[ \frac{\cos ^3(e+f x)}{3 f (a-b)}-\frac{a \cos (e+f x)}{f (a-b)^2}-\frac{a \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{f (a-b)^{5/2}} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]^3/(a + b*Tan[e + f*x]^2),x]

[Out]

-((a*Sqrt[b]*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/((a - b)^(5/2)*f)) - (a*Cos[e + f*x])/((a - b)^2*f) +
 Cos[e + f*x]^3/(3*(a - b)*f)

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 325

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^(p + 1))/(a*
c*(m + 1)), x] - Dist[(b*(m + n*(p + 1) + 1))/(a*c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sin ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{-1+x^2}{x^4 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac{\cos ^3(e+f x)}{3 (a-b) f}+\frac{a \operatorname{Subst}\left (\int \frac{1}{x^2 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{(a-b) f}\\ &=-\frac{a \cos (e+f x)}{(a-b)^2 f}+\frac{\cos ^3(e+f x)}{3 (a-b) f}-\frac{(a b) \operatorname{Subst}\left (\int \frac{1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{(a-b)^2 f}\\ &=-\frac{a \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{(a-b)^{5/2} f}-\frac{a \cos (e+f x)}{(a-b)^2 f}+\frac{\cos ^3(e+f x)}{3 (a-b) f}\\ \end{align*}

Mathematica [A]  time = 0.653202, size = 149, normalized size = 1.77 \[ \frac{(a-b) \cos (e+f x) ((a-b) \cos (2 (e+f x))-5 a-b)+6 a \sqrt{b} \sqrt{a-b} \tan ^{-1}\left (\frac{\sqrt{a-b}-\sqrt{a} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{b}}\right )+6 a \sqrt{b} \sqrt{a-b} \tan ^{-1}\left (\frac{\sqrt{a-b}+\sqrt{a} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{b}}\right )}{6 f (a-b)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]^3/(a + b*Tan[e + f*x]^2),x]

[Out]

(6*a*Sqrt[a - b]*Sqrt[b]*ArcTan[(Sqrt[a - b] - Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]] + 6*a*Sqrt[a - b]*Sqrt[b]*Ar
cTan[(Sqrt[a - b] + Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]] + (a - b)*Cos[e + f*x]*(-5*a - b + (a - b)*Cos[2*(e + f
*x)]))/(6*(a - b)^3*f)

________________________________________________________________________________________

Maple [A]  time = 0.055, size = 107, normalized size = 1.3 \begin{align*}{\frac{a \left ( \cos \left ( fx+e \right ) \right ) ^{3}}{3\,f \left ( a-b \right ) ^{2}}}-{\frac{b \left ( \cos \left ( fx+e \right ) \right ) ^{3}}{3\,f \left ( a-b \right ) ^{2}}}-{\frac{\cos \left ( fx+e \right ) a}{f \left ( a-b \right ) ^{2}}}+{\frac{ab}{f \left ( a-b \right ) ^{2}}\arctan \left ({ \left ( a-b \right ) \cos \left ( fx+e \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)^3/(a+b*tan(f*x+e)^2),x)

[Out]

1/3/f/(a-b)^2*a*cos(f*x+e)^3-1/3/f/(a-b)^2*b*cos(f*x+e)^3-a*cos(f*x+e)/(a-b)^2/f+1/f*a*b/(a-b)^2/(b*(a-b))^(1/
2)*arctan((a-b)*cos(f*x+e)/(b*(a-b))^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.47034, size = 473, normalized size = 5.63 \begin{align*} \left [\frac{2 \,{\left (a - b\right )} \cos \left (f x + e\right )^{3} + 3 \, a \sqrt{-\frac{b}{a - b}} \log \left (\frac{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \,{\left (a - b\right )} \sqrt{-\frac{b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) - 6 \, a \cos \left (f x + e\right )}{6 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} f}, \frac{{\left (a - b\right )} \cos \left (f x + e\right )^{3} - 3 \, a \sqrt{\frac{b}{a - b}} \arctan \left (-\frac{{\left (a - b\right )} \sqrt{\frac{b}{a - b}} \cos \left (f x + e\right )}{b}\right ) - 3 \, a \cos \left (f x + e\right )}{3 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="fricas")

[Out]

[1/6*(2*(a - b)*cos(f*x + e)^3 + 3*a*sqrt(-b/(a - b))*log(((a - b)*cos(f*x + e)^2 + 2*(a - b)*sqrt(-b/(a - b))
*cos(f*x + e) - b)/((a - b)*cos(f*x + e)^2 + b)) - 6*a*cos(f*x + e))/((a^2 - 2*a*b + b^2)*f), 1/3*((a - b)*cos
(f*x + e)^3 - 3*a*sqrt(b/(a - b))*arctan(-(a - b)*sqrt(b/(a - b))*cos(f*x + e)/b) - 3*a*cos(f*x + e))/((a^2 -
2*a*b + b^2)*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)**3/(a+b*tan(f*x+e)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.4162, size = 243, normalized size = 2.89 \begin{align*} \frac{a b \arctan \left (\frac{a \cos \left (f x + e\right ) - b \cos \left (f x + e\right )}{\sqrt{a b - b^{2}}}\right )}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \sqrt{a b - b^{2}} f} + \frac{a^{2} f^{5} \cos \left (f x + e\right )^{3} - 2 \, a b f^{5} \cos \left (f x + e\right )^{3} + b^{2} f^{5} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{5} \cos \left (f x + e\right ) + 3 \, a b f^{5} \cos \left (f x + e\right )}{3 \,{\left (a^{3} f^{6} - 3 \, a^{2} b f^{6} + 3 \, a b^{2} f^{6} - b^{3} f^{6}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="giac")

[Out]

a*b*arctan((a*cos(f*x + e) - b*cos(f*x + e))/sqrt(a*b - b^2))/((a^2 - 2*a*b + b^2)*sqrt(a*b - b^2)*f) + 1/3*(a
^2*f^5*cos(f*x + e)^3 - 2*a*b*f^5*cos(f*x + e)^3 + b^2*f^5*cos(f*x + e)^3 - 3*a^2*f^5*cos(f*x + e) + 3*a*b*f^5
*cos(f*x + e))/(a^3*f^6 - 3*a^2*b*f^6 + 3*a*b^2*f^6 - b^3*f^6)